package ai.text.impl.extractor;

public enum PhraseType {
	ADJP("ADJP","Adjective Phrase."),
	ADVP("ADVP","Adverb Phrase."),
	CONJP("CONJP","Conjunction Phrase."),
	FRAG("FRAG","Fragment."),
	INTJ("INTJ","Interjection. Corresponds approximately to the part-of-speech tag UH."),
	LST("LST","List marker. Includes surrounding punctuation."),
	NAC("NAC","Not a Constituent; used to show the scope of certain prenominal modifiers within an NP."),
	NP("NP","Noun Phrase."),
	NX("NX","Used within certain complex NPs to mark the head of the NP. Corresponds very roughly to N-bar level but used quite differently."),
	PP("PP","Prepositional Phrase."),
	PRN("PRN","Parenthetical."),
	PRT("PRT","Particle. Category for words that should be tagged RP."),
	QP("QP","Quantifier Phrase (i.e. complex measure/amount phrase); used within NP."),
	RRC("RRC","Reduced Relative Clause."),
	UCP("UCP","Unlike Coordinated Phrase."),
	VP("VP","Vereb Phrase."),
	WHADJP("WHADJP","Wh-adjective Phrase. Adjectival phrase containing a wh-adverb, as in how hot."),
	WHAVP("WHAVP","Wh-adverb Phrase. Introduces a clause with an NP gap. May be null (containing the 0 complementizer) or lexical, containing a wh-adverb such as how or why."),
	WHNP("WHNP","Wh-noun Phrase. Introduces a clause with an NP gap. May be null (containing the 0 complementizer) or lexical, containing some wh-word, e.g. who, which book, whose daughter, none of which, or how many leopards."),
	WHPP("WHPP","Wh-prepositional Phrase. Prepositional phrase containing a wh-noun phrase (such as of which or by whose authority) that either introduces a PP gap or is contained by a WHNP."),
	X("X","Unknown, uncertain, or unbracketable. X is often used for bracketing typos and in bracketing the...the-constructions.");
	
	
	
	private String code;
	private String name;
	
	private PhraseType(String code, String name) {
		this.code = code;
		this.name = name;
	}
	
	public PhraseType valueOfCode(String str) {
		for(PhraseType type: values()) {
			if(type.code.equals(str)) {
				return type;
			}
		}
		return null;
	}
}
